﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ProjectEuler
{
    internal class Problem3
    {
        public void Solve()
        {
            long number = 600851475143;
            long maxPrimeFactor = 2;
            var numbers = new List<long>();
            var sb = new StringBuilder("factors: ");

            for (long i = 2; i < number; i++)
            {
                if (0 == number % i && Common.IsPrime(i))
                {
                    Console.Write(">" + i);
                    numbers.Add(i);
                    maxPrimeFactor = i;
                    sb.Append(i + ", ");
                }
            }

            Console.WriteLine(sb.ToString());
            Console.WriteLine("Max factor: "+ maxPrimeFactor);
        }
    }
}